// #ifndef __STRING__
#include "string"
#include <string_view>
#define __stdstring_in_using__
using String_t = std::string_view;
#if 0
#define __STRING__

class String_t
{
  public:
    String_t(const char * const input) : pre_order_space(20), size(0)
    {
        int i{0};
        _innerContent = new char[pre_order_space];
        while (input[i] != '\0')
        {
            if (i <= pre_order_space)
                _innerContent[i] = input[i];
            else
            {
                _innerContent = new char[pre_order_space * 2];
                i=0;
            }

            i++;
        }
        size = i;
        
    }
    String_t(char *const input) : pre_order_space(20), size(0)
    {
        int i{0};
        _innerContent = new char[pre_order_space];
        while (input[i] != '\0')
        {
            if (i <= pre_order_space)
                _innerContent[i] = input[i];
            else
            {
                _innerContent = new char[pre_order_space * 2];
                i = 0;
            }

            i++;
        }
        size = i;
    }
    String_t(String_t &input) : pre_order_space(20), size(0)
    {
        int i{0};
        _innerContent = new char[pre_order_space];
        while (input[i] != '\0')
        {
            if (i <= pre_order_space)
                _innerContent[i] = input[i];
            else
            {
                _innerContent = new char[pre_order_space * 2];
                i = 0;
            }

            i++;
        }
        size = i;
    }

    char &operator[](int i)
    {
        return _innerContent[i];
    }
    char &operator[](int i) const
    {
        return _innerContent[i];
    }

    String_t& operator=(const char*& input)
    {
        int i{0};
        _innerContent = new char[pre_order_space];
        while (input[i] != '\0')
        {
            if (i <= pre_order_space)
                _innerContent[i] = input[i];
            else
            {
                _innerContent = new char[pre_order_space * 2];
                i = 0;
            }

            i++;
        }
        size = i;
        return *this;
    }
    String_t& operator=(const String_t& input)
    {
        int i{0};
        _innerContent = new char[pre_order_space];
        while (input[i] != '\0')
        {
            if (i <= pre_order_space)
                _innerContent[i] = input[i];
            else
            {
                _innerContent = new char[pre_order_space * 2];
                i = 0;
            }

            i++;
        }
        size = i;
        return *this;
    }
    bool operator==(String_t input)
    {
        return this->_innerContent == input._innerContent;
    }
    bool operator==(char* input)
    {
        return input == _innerContent;
    }
    bool operator==(const char *input)
    {
        return input == _innerContent;
    }

    const int &length() const
    {
        return this->size;
    }
    ~String_t()
    {
        delete[] _innerContent;
    }

  private:
    char *_innerContent;
    int pre_order_space;
    int size;
};

#endif